package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IAssets;

public class AssetsModelImpl implements IAssets {
    private UserDAO userDAO ;
    public AssetsModelImpl(Context context){
        userDAO = new UserDAO(context) ;
    }

    @Override
    public void insertAccount(String phone, double num, String type, String time_day, String time_sec) {
        userDAO.insertAccount(phone, num, type, time_day, time_sec);
    }

    @Override
    public double getNum(String phone) {
        return userDAO.getSum(phone);
    }

    @Override
    public User getUserByPhone(String phone) {
        return userDAO.getUser(phone);
    }
}
